package com.labofjet.entity;

import javax.persistence.Embedded;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.NamedStoredProcedureQueries;
import javax.persistence.NamedStoredProcedureQuery;
import javax.persistence.ParameterMode;
import javax.persistence.StoredProcedureParameter;

import org.apache.commons.lang3.builder.ToStringBuilder;

@Entity
@NamedStoredProcedureQueries({
        @NamedStoredProcedureQuery(name = "User.plus1", procedureName = "plus1inout", parameters = {
                @StoredProcedureParameter(mode = ParameterMode.IN, name = "arg", type = Integer.class),
                @StoredProcedureParameter(mode = ParameterMode.OUT, name = "res", type = Integer.class) }),
        @NamedStoredProcedureQuery(name = "User.mytest", procedureName = "mytest") })
public class A {
    @EmbeddedId
    APK id;

    String age;

    @Embedded
    AComponent acomponent;

    int b;
    
    public AComponent getAcomponent() {
        return acomponent;
    }

    public void setAcomponent(AComponent acomponent) {
        this.acomponent = acomponent;
    }

    public String getAge() {
        return age;
    }

    public void setAge(String age) {
        this.age = age;
    }

    public APK getId() {
        return id;
    }

    public void setId(APK id) {
        this.id = id;
    }

    
    
    /**
     * @return the b
     */
    public int getB() {
        return b;
    }

    /**
     * @param b the b to set
     */
    public void setB(int b) {
        this.b = b;
    }

    @Override
    public int hashCode() {
        // TODO Auto-generated method stub
        System.out.println("Ahash");
        return super.hashCode();
    }

    @Override
    public boolean equals(Object obj) {
        // TODO Auto-generated method stub
        System.out.println("Aequals");
        return super.equals(obj);
    }
    
    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this);
    }
}
